/**
 * Ordering function by total suitability.
 */
function ordering_suitability(a,b){
	return ((b.user_suitability||0)+(b.item_suitability||0))-
		   ((a.user_suitability||0)+(a.item_suitability||0));
}

/**
 * Ordering function by creation date.
 */
function ordering_creationDate(a,b){
	//Comparing by id, since ids are created sequentially
	return b.id-a.id;
}

/**
 * Ordering function by user suitability.
 */
function ordering_suitabilityUser(a,b){
	return (b.user_suitability||0)-(a.user_suitability||0);
}

/**
 * Ordering function by item suitability.
 */
function ordering_suitabilityItem(a,b){
	return (b.item_suitability||0)-(a.item_suitability||0);
}
